package LECONGHAU.STRUCTURE_PROGRAMMING.EXCERCISES;

import java.util.Scanner;

public class hinhtamgiac {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
double a,b,c;
System.out.println("nhap vao canh a b c");
Scanner sc=new Scanner(System.in);
a=sc.nextDouble();
b=sc.nextDouble();
c=sc.nextDouble();
if(a+b>c&&b+c>a&&c+a>b){
double	p=(a+b+c)/2;
double area=Math.sqrt(p*(p-a)*(p-b)*(p-c));
double peri=a+b+c;
System.out.println("chu vi la: " +peri);
System.out.println("dien tich la: " +area);
}else {
	System.out.println("khong phai tam giac");
}
	}

}
